package com.lemo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Rest {

    private final Logger logger = LoggerFactory.getLogger(this.getClass().getCanonicalName());

    @GetMapping("/api/{id}")
    @PermIgnore
    public String m1(@PathVariable("id") String id) {
        logger.info("{}", this.getClass().getSimpleName());
        return id;
    }

    @GetMapping("/api2/{id}")
    public String m2(@PathVariable("id") String id) {
        logger.info("{}", Thread.currentThread().getStackTrace()[1].getMethodName());
        return id;
    }

}
